<template>
  <ul class='second-menu'>
    <li v-for="(item,index) in getListData" @click="gotoHere(item)">
      <router-link :to="item.url">
        <img :src="item.img" alt="">
        <p>{{item.label}}</p>
      </router-link>
    </li>
  </ul>
</template>
<script>
export default {
  props:["listData"],
  components: {},
  name: "",
  data() {
    return {};
  },
  computed:{
    getListData(){
      return this.listData || []
    }
  },
  methods: {
    gotoHere(item){
      if(!item.url){
        this.$store.state.dialogs.alert.content=item.label+" 正在升级中，请等待"
        this.$store.state.dialogs.alert.show=true
      }
    }
  },
  created() {}
};
</script>
<style lang="scss" scoped>
.second-menu {
    display: flex;
    flex-wrap: wrap;
    font-size: 14px;
    color: #666;

    li{
      width: calc(100% / 3);
      text-align: center;
      border-right: 1px solid #f2f2f2;
      border-top: 1px solid #f2f2f2;
      box-sizing: border-box;

      a{
        display: inline-block;
        width: 100%;
        height: 100%;
        box-sizing: border-box;
        padding: 20px 0;
        color: #666;
      }

      img{
        width: 24px;
        height: 24px;
        margin: 0 auto;
      }
    }
    li:nth-child(1),li:nth-child(2),li:nth-child(3){
      border-top: none;
    }
    li:nth-child(3n+3){
      border-right: none;
    }
}
</style>